var t = getApp();

Page({
    data: {
        web_url: ""
    },
    onLoad: function(t) {
        this.getData(), wx.setNavigationBarTitle({
            title: "店铺二维码"
        });
    },
    tapImg: function() {
        wx.previewImage({
            current: this.data.web_url,
            urls: [ this.data.web_url ]
        });
    },
    getData: function() {
        var n = this, e = t.getNetAddresss("plugin.debt-shop.frontend.debtor.getCode");
        t._getNetWork({
            url: e,
            success: function(t) {
                var e = t.data;
                1 == e.result ? n.setData({
                    web_url: e.data.mini_url
                }) : wx.showToast({
                    icon: "none",
                    title: e.msg,
                    duration: 1500
                });
            },
            fail: function(t) {
                console.log(t);
            }
        });
    },
    onReady: function() {},
    onShow: function() {},
    onHide: function() {},
    onUnload: function() {},
    onPullDownRefresh: function() {},
    onReachBottom: function() {},
    onShareAppMessage: function() {}
});